package mysql

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	GoodsTitle string `gorm:"type:varchar(30);not null;comment:商品名称"`
	GoodsPrice int64  `gorm:"type:int(11);comment:商品价格"`
	GoodsNum   int64  `gorm:"type:int(11);comment:商品数量"`
}

func (g *Goods) Create() error {
	return Db.Create(&g).Error
}
func (og *Goods) CreateIn() error {
	return Db.Create(&og).Error
}
